﻿using FluentValidation;
using Solution.Application.Commands.Dependency;
using System;

namespace Solution.Application.Commands.Users.Detail
{
    public class Validator : BaseAbstractValidator<Request>
    {
        public Validator()
        {
            RuleFor(x => x).Must(x => !string.IsNullOrWhiteSpace(x.UserName) || x.UserId > 0).WithMessage("The user ID and user name cannot be empty at the same time");
        }
    }
}